package io;

import java.io.*;

/** 缓冲字符输入流读取文本数据 */
public class BRDemo {
    public static void main(String[] args) throws IOException {
        FileInputStream fis = new FileInputStream("pw.txt");
        InputStreamReader isr = new InputStreamReader(fis);
        BufferedReader br = new BufferedReader(isr);
        String line;
        while ((line = br.readLine())!=null){
            System.out.println(line);//换行输出
            //System.out.println(line);//没有换行操作
        }
        br.close();
    }
}
